<!--病例系统medical-record-information-->
<template>
  <el-dialog
    title="相关就诊信息"
    :visible.sync="applyMRITableVisible"
    :modal="false"
    width="500px"
    custom-class="dragDialog"
    drag-top="300px"
    v-dialogDrag
  >
    <div
      v-loading="loading"
    >
      <div
        v-if="applyMRITableVisible"
      >
        <el-table
          ref="tableRef"
          :data="tableData"
          border
          style="width: 100%"
          class="ky-table"
        >
          <el-table-column show-overflow-tooltip prop="patientName" width="100" label="就诊医生"></el-table-column>
          <el-table-column show-overflow-tooltip prop="visitDateTime" width="165" label="就诊日期"></el-table-column>
          <el-table-column show-overflow-tooltip prop="medicalContent" label="病历内容"></el-table-column>
        </el-table>
      </div>
    </div>
  </el-dialog>
</template>

<script>
import { postHisExamGetmedicals } from '@/api/api'
export default {
  data() {
    return {
      loading: false,
      applyMRITableVisible: false,
      formdata: {
        organizationCode: '', // 申请医院代码
        patientSource: 0, // 病人类型 1 门诊 2 住院 3 体检 4 绿检 5急诊 6外院、0未知 默认0
        dep: '', // 检查部门
        medicalCardNo: '' // 就诊卡号 需加密
      },
      tableData: [
        // {
        //   visitDoctor: '张三',  // 就诊医生 patientName 现在用的这个字段后面需要修改
        //   visitDateTime: '2022-12-12 12:22:22',
        //   medicalContent: '病历内容12312312wqeqweqweqeq'
        // }
      ]
    }
  },

  mounted() {
  },
  methods: {
    init(data) {
      this.formdata = { ...data }
      this.getMedicals()
    },
    getMedicals() {
      const params = {
        'organizationCode': this.formdata.organizationCode, // 申请医院代码
        'patientSource': this.formdata.patientSource, // 病人类型 1 门诊 2 住院 3 体检 4 绿检 5急诊 6外院、0未知 默认0
        'dep': this.formdata.dep, // 检查部门
        'medicalCardNo': this.formdata.medicalCardNo // 就诊卡号 需加密
      }
      postHisExamGetmedicals(params).then(res => {
        if (res && res.code === 10000) {
          this.tableData = res.content.list
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
$primaryColor: #00A4E9;
$tableThBgColor: #eff6fe;
$warningColor: #ff7600;
$tableSlectedBgColor: #ffe3cc;
$tableDangerColor: #f00;
.his_cont{
  background-color: #ebeef5;
  padding-bottom: 10px;
  /deep/ .el-radio__label{
    padding-left: 5px;
    font-size: 12px;
  }
  /deep/ .el-radio__input.is-checked+.el-radio__label{
    color: $warningColor;
  }
  /deep/ .el-radio__input .el-radio__inner:hover{
    border-color:  $warningColor;
  }
  /deep/ .el-radio__input.is-checked .el-radio__inner{
    border-color:  $warningColor;
    background:  $warningColor;
  }
  /deep/ .el-table td,/deep/ .el-table th{
    padding: 4px 0;
  }
}

/deep/ .el-dialog__title {
  line-height: 24px;
  font-size: 14px;
  color: #303133;
}

/deep/ .el-dialog__body {
  padding: 0px 10px 10px;
  color: #606266;
  font-size: 14px;
  word-break: break-all;
}

/deep/ .el-dialog__header {
  padding: 10px 10px 5px;
}

/deep/ .el-dialog__headerbtn {
  top: 13px;
}
</style>
